package com.parking.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/***
 * 登录对象
 * 参数：
 ("用户账号")：userAccount;
 ("用户密码")：userPass;
 */
@Data
@ApiModel("用户登录对象")
public class UserLoginForm {
   /**
    * ("用户账号")：userAccount;
    * */
   @ApiModelProperty("用户账号")
   @Size(max = 20, message = "用户账号长度不能超过20位")
   @Pattern(regexp = "^[a-zA-Z0-9]*$", message = "用户账号只能包含字母或数字")
    private String userAccount;
    /**
     * ("用户密码")：userPass;
     * */
    @ApiModelProperty("用户密码")
    @Length(min = 6,max = 8,message = "密码长度错误6到8位")
    private String userPass;

}
